{extend name="base/main" /}
{block name="body"}
    <div class="wrapper wrapper-content animated fadeInRight">
		<div class="ibox float-e-margins">
			<div class="ibox-title">
				<h5>主页 / 文章管理 / 添加文章</h5>
				<div class="ibox-tools">
					<a class="collapse-link"><i class="fa fa-chevron-up"></i></a>
					<a class="close-link"><i class="fa fa-times"></i></a>
				</div>
			</div>
			<div class="ibox-content">
				<form id="f" action="{:url('article/edit')}" class="form-horizontal m-t">
					<div class="form-group">
						<label class="col-sm-1 control-label">文章标题：</label>
						<div class="col-sm-3">
							<input name="title" value="{$find.title}" class="form-control" type="text" datatype="*2-80" errormsg="分类名称范围在2~80位之间！">
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 文章名称</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">文章所属分类：</label>
						<div class="col-sm-3">
							<select name="category_id" class="form-control" datatype="n" errormsg="请选择所属分类！">
								<option value="">---请选择分类---</option>
								{volist name="tree" id="item"}
									<option value="{$item.id}" <?php if($find['category_id'] == $item['id']){echo 'selected';}?> >{$item.title_show}</option>
								{/volist}
							</select>
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 选择文章所属分类</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">是否推荐：</label>
						<div class="col-sm-3">
							<select name="isrecomm" class="form-control" datatype="n" errormsg="请选择是否推荐！">
								<option value="1" <?php if($find['isrecomm'] == 1){echo 'selected';}?> >否</option>
								<option value="2" <?php if($find['isrecomm'] == 2){echo 'selected';}?> >是</option>
							</select>
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 选择当前要发布的文章是否推荐</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">文章封面：</label>
						<div class="col-sm-3">
							{:addons('upload',['type'=>'*.jpg;*.jpeg;*.png;*.gif','iahave'=>'yes','isloads'=>'yes','name'=>'cover','data'=>$find['cover']])}
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 上传文章封面</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">文章关键字：</label>
						<div class="col-sm-3">
							<input name="keywords" value="{$find.keywords}" class="form-control" type="text" datatype="*0-80" errormsg="文章关键字长度范围在0~80位之间！">
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i> 显示当前文章的关键字（keywords），多个使用英文逗号隔开（,）</span>
						</div>
					</div>
					<div class="form-group">
						<label class="col-sm-1 control-label">内容：</label>
						<div class="col-sm-3">
							{:addons('editor',['name'=>'content','id'=>'content','value'=>$find['content']])}
							<span class="help-block m-b-none Validform_checktip" ><i class="fa fa-info-circle"></i>填写文章详情内容</span>
						</div>
					</div>
					<div class="form-group">
						<div class="col-sm-2 col-sm-offset-1">
							<input type="hidden" name="id" value="{$find.id}"/>
							<button class="btn btn-primary" type="submit">提交</button>
							<button class="btn btn-default historygo" type="button">返回</button>
						</div>
					</div>
				</form>
			</div>
        </div>
    </div>
{/block}